Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add support for custom KubeClient #154

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

regadas
Copy link
Contributor

@regadas regadas commented Mar 2, 2021

Allow supplying a custom KubeClient to PluginManager. When supplied PluginManager should use this client instead of the internal one.

By supplying a custom KubeClient we are able to create a client to a remote cluster.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

@regadas
Copy link
Contributor Author

regadas commented Mar 2, 2021

@kumare3 @EngHabu PTAL

@regadas regadas force-pushed the pluginentry_kubeclient branch from 9ca0d91 to 71567fb Compare March 2, 2021 15:56
@codecov-io
Copy link

codecov-io commented Mar 2, 2021

Codecov Report

Merging #154 (a0eaa51) into master (8211c56) will increase coverage by 0.52%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   59.92%   60.44%   +0.52%     
==========================================
  Files         129      130       +1     
  Lines        6967     7044      +77     
==========================================
+ Hits         4175     4258      +83     
+ Misses       2371     2359      -12     
- Partials      421      427       +6     
Flag Coverage Δ
unittests 60.44% <ø> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...sks/plugins/k8s/sagemaker/hyperparameter_tuning.go 60.69% <0.00%> (-1.16%) ⬇️
go/tasks/plugins/array/k8s/task.go 47.93% <0.00%> (-0.77%) ⬇️
go/tasks/plugins/array/k8s/executor.go 38.14% <0.00%> (ø)
go/tasks/plugins/array/k8s/launcher.go 32.00% <0.00%> (ø)
go/tasks/plugins/array/k8s/transformer.go 65.62% <0.00%> (ø)
go/tasks/plugins/k8s/container/container.go 78.94% <0.00%> (ø)
go/tasks/plugins/array/awsbatch/transformer.go 74.77% <0.00%> (ø)
go/tasks/plugins/array/awsbatch/config/config.go 0.00% <0.00%> (ø)
go/tasks/plugins/k8s/sagemaker/builtin_training.go 71.91% <0.00%> (ø)
go/tasks/plugins/array/inputs.go 100.00% <0.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8211c56...a0eaa51. Read the comment docs.

@regadas regadas force-pushed the pluginentry_kubeclient branch 2 times, most recently from d2c71f6 to 0e5774c Compare March 5, 2021 15:44
@regadas regadas force-pushed the pluginentry_kubeclient branch 2 times, most recently from 3774465 to 574a2fa Compare March 5, 2021 18:12
@regadas regadas force-pushed the pluginentry_kubeclient branch from 574a2fa to ca00149 Compare March 9, 2021 10:45
@@ -32,6 +32,14 @@ type PluginEntry struct {
// support the same task type. This must be a subset of RegisteredTaskTypes and at most one default per task type
// is supported.
DefaultForTaskTypes []pluginsCore.TaskType
// Returns a new KubeClient to be used instead of the internal controller-runtime client.
NewKubeClient func(ctx context.Context) (pluginsCore.KubeClient, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this - customKubeClient

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

@kumare3
Copy link
Contributor

kumare3 commented Mar 17, 2021

Looks good to me, one nit

Signed-off-by: Filipe Regadas <[email protected]>
@kumare3 kumare3 merged commit 3a6c640 into flyteorg:master Mar 17, 2021
milton0825 pushed a commit to milton0825/flyteplugins that referenced this pull request May 25, 2021
* Add support for custom KubeClient

Signed-off-by: Filipe Regadas <[email protected]>

* review

Signed-off-by: Filipe Regadas <[email protected]>
Signed-off-by: Chao-Han Tsai <[email protected]>
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* Add support for custom KubeClient

Signed-off-by: Filipe Regadas <[email protected]>

* review

Signed-off-by: Filipe Regadas <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants